#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 20-6-29 上午11:59
# @Author  : 邹顺利
# @Email   : 409358374@qq.com
# @File    : study_01.py
# @Software: PyCharm

import json
import platform
from collections import OrderedDict
import os, re, sys
import shutil
import getpass

root_path = r'/home/zsl/Data/study/Python/慕课Python入门与进阶'
for folder in os.listdir(root_path):
    folder_path = os.path.join(root_path, folder)
    if os.path.isdir(folder_path) and folder != 'All':
        for mp4 in os.listdir(folder_path):
            mp4_path = os.path.join(folder_path, mp4)
            dst_path = os.path.join(root_path, 'All')
            if os.path.isfile(mp4_path) and mp4.split('.')[-1] == 'mp4':
                shutil.copy(mp4_path, dst_path)